<#include "/WEB-INF/default/fragment/header.ftl">
<body>
<#include "/WEB-INF/default/fragment/nav.ftl">

<div class="container">
<form action="${request.contextPath}/team_post" method="post">
    <fieldset>
        <legend>创建团队</legend> 
        <div class="form-group">
            <label>团队名称</label>
            <input type="text" class="form-control" name="team.name" placeholder="团队的名称，如 java1605" value="<#if team?exists && team.name?exists>${team.name}</#if>">
            <p class="help-block">${fieldErrors['team.name']!""}</p>
        </div>
        <div class="form-group">
            <label>团队描述</label>
            <input type="text" class="form-control" name="team.desc" placeholder="团队的描述，如 java专业第1605实训部" value="<#if team?exists && team.desc?exists>${team.desc}</#if>">
            <p class="help-block">${fieldErrors['team.desc']!""}</p>
        </div>
        <div class="form-group">
            <label>个性域名</label>
            <input type="text" class="form-control" name="team.subdomain" placeholder="/team-" value="<#if team?exists && team.subdomain?exists>${team.subdomain}</#if>">
            <p class="help-block">${fieldErrors['team.subdomain']!""}</p>
        </div>
        <div class="form-group">
            <label>团队介绍</label>
            <textarea class="form-control" name="team.intro" placeholder="副文本介绍，可以制作个性化的团队页面"></textarea>
            <p class="help-block">${fieldErrors['team.intro']!""}</p>
        </div>

        <div class="form-group">
            <label>开始日期</label>
            <input type="text" class="form-control" name="team.beginDate" placeholder="yyyy-MM-dd" value="<#if team?exists && team.gmtBegin?exists>${team.gmtBegin}</#if>">
            <p class="help-block">${fieldErrors['team.beginDate']!""}</p>
        </div>
        <div class="form-group">
            <label>预计结束日期：</label>
            <input type="text" class="form-control" name="team.endDate" placeholder="yyyy-MM-dd" value="<#if team?exists && team.gmtEnd?exists>${team.gmtEnd}</#if>">
            <p class="help-block">${fieldErrors['team.endDate']!""}</p>
        </div>

        <div class="form-group">
            <label>团队状态</label>
            <div class="checkbox">
                <p><label><input type="radio" name="team.status" value="1" <#if team?exists && team.status?exists && team.status == 1>checked</#if>>尚未开始</label></p>
                <p><label><input type="radio" name="team.status" value="2" <#if team?exists && team.status?exists && team.status == 2>checked</#if>>正在实训中</label></p>
                <p><label><input type="radio" name="team.status" value="3" <#if team?exists && team.status?exists && team.status == 3>checked</#if>>毕业项目实战</label></p>
                <p><label><input type="radio" name="team.status" value="4" <#if team?exists && team.status?exists && team.status == 4>checked</#if>>完成实训</label></p>
                <p><label><input type="radio" name="team.status" value="5" <#if team?exists && team.status?exists && team.status == 5>checked</#if> >结束团队</label></p>
            </div>${fieldErrors['team.status']!""}
            <p class="help-block">状态值只能从左往右顺序设置，不能倒序操作。如：已进入“毕业项目实战”阶段的团队不能再次回到“正在实训中”状态</p>
        </div>

        <button type="submit" class="btn btn-success btn-block">保存</button>
    </fieldset>
</form>

</div>
</body>
<#include "/WEB-INF/default/fragment/footer.ftl">
